<html>
<head><meta charset="utf-8"><title>Debugging with GDB · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html">Debugging with GDB</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="198373696"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198373696" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198373696">(May 21 2020 at 20:35)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> Would you mind helping me a little? Do I need to compile <code>rustc</code> to debug it with GDB? Inside of GDB, what should I do?</p>



<a name="198373796"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198373796" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198373796">(May 21 2020 at 20:36)</a>:</h4>
<p>I just installed it and tested it with my hello world program (the one and only)</p>



<a name="198373839"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198373839" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198373839">(May 21 2020 at 20:36)</a>:</h4>
<p>So at least I won't have to bother you with MacOS permissions and certificates and stuff :D</p>



<a name="198374853"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198374853" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198374853">(May 21 2020 at 20:44)</a>:</h4>
<p>yeah I can only tell you how it works on Linux :P</p>



<a name="198374905"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198374905" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198374905">(May 21 2020 at 20:45)</a>:</h4>
<p>so I assume you have a command <code>rustc &lt;arguments&gt;</code> that is the culprit</p>



<a name="198374942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198374942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198374942">(May 21 2020 at 20:45)</a>:</h4>
<p>if you have been using cargo to reproduce so far you'll have to distill this to a <code>rustc</code> command first</p>



<a name="198375021"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198375021" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198375021">(May 21 2020 at 20:46)</a>:</h4>
<p>then I would do <code>gdb rustc</code>, after which a prompt opens. in that prompt you do <code>run &lt;rustc argument&gt;</code>, which starts rustc. then you wait until you think it is in the endless/looooong loop you want to capture.</p>



<a name="198375083"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198375083" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198375083">(May 21 2020 at 20:46)</a>:</h4>
<p>then you do Ctrl-C, and do <code>bt</code> to print the backtrace, and copy-paste that</p>



<a name="198375370"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198375370" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198375370">(May 21 2020 at 20:48)</a>:</h4>
<p>Oh it's that simple? :D</p>



<a name="198375455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198375455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198375455">(May 21 2020 at 20:49)</a>:</h4>
<p>well if you get a backtrace successfully doing that</p>



<a name="198375458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198375458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198375458">(May 21 2020 at 20:49)</a>:</h4>
<p>it may not work :)</p>



<a name="198375470"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198375470" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198375470">(May 21 2020 at 20:49)</a>:</h4>
<p><span aria-label="frown" class="emoji emoji-1f641" role="img" title="frown">:frown:</span></p>



<a name="198375540"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198375540" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198375540">(May 21 2020 at 20:50)</a>:</h4>
<p>this works pretty reliably for me...</p>



<a name="198375612"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198375612" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198375612">(May 21 2020 at 20:50)</a>:</h4>
<p>okay if rustc does work off the main thread you might have to <code>thread apply all bt</code> and find the right backtrace</p>



<a name="198375666"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198375666" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198375666">(May 21 2020 at 20:50)</a>:</h4>
<p>(the exact command for this might be slightly different)</p>



<a name="198375671"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198375671" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198375671">(May 21 2020 at 20:50)</a>:</h4>
<p>I got a <code>[New Thread 0xe03 of process 1445]</code> message</p>



<a name="198375687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198375687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198375687">(May 21 2020 at 20:50)</a>:</h4>
<p>So I guess it started in another thread?</p>



<a name="198375699"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198375699" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198375699">(May 21 2020 at 20:50)</a>:</h4>
<p>yeah thats just gdb telling you a thread started, but it should go on after that</p>



<a name="198375729"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198375729" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198375729">(May 21 2020 at 20:51)</a>:</h4>
<p>Let's let it run for 5 minutes or so</p>



<a name="198375738"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198375738" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198375738">(May 21 2020 at 20:51)</a>:</h4>
<p>eh</p>



<a name="198375753"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198375753" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198375753">(May 21 2020 at 20:51)</a>:</h4>
<p>wow you are patient^^</p>



<a name="198375786"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198375786" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198375786">(May 21 2020 at 20:51)</a>:</h4>
<p>so in the bug report, did it stop producing LOG output at some point?</p>



<a name="198375823"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198375823" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198375823">(May 21 2020 at 20:51)</a>:</h4>
<p>I think it did</p>



<a name="198375886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198375886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198375886">(May 21 2020 at 20:52)</a>:</h4>
<p>how long did that take?</p>



<a name="198375889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198375889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198375889">(May 21 2020 at 20:52)</a>:</h4>
<p>But I think it was only set to debug <code>INFO</code> level</p>



<a name="198375896"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198375896" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198375896">(May 21 2020 at 20:52)</a>:</h4>
<p>Errrr</p>



<a name="198375903"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198375903" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198375903">(May 21 2020 at 20:52)</a>:</h4>
<p>Let me find that out</p>



<a name="198375904"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198375904" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198375904">(May 21 2020 at 20:52)</a>:</h4>
<p>probably best thing is to run gdb with the <code>RUSTC_LOG</code> env var and then wait until the output stops</p>



<a name="198375923"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198375923" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198375923">(May 21 2020 at 20:52)</a>:</h4>
<p>Alright</p>



<a name="198375989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198375989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198375989">(May 21 2020 at 20:53)</a>:</h4>
<p>Hmm, doing Ctrl+C doesn't seem to work</p>



<a name="198376009"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198376009" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198376009">(May 21 2020 at 20:53)</a>:</h4>
<p>Ctrl-C should get you to the gdb prompt</p>



<a name="198376018"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198376018" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198376018">(May 21 2020 at 20:53)</a>:</h4>
<p>then <code>quit</code> quits gdb</p>



<a name="198376031"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198376031" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198376031">(May 21 2020 at 20:53)</a>:</h4>
<p>But it doesn't <span aria-label="eyes" class="emoji emoji-1f440" role="img" title="eyes">:eyes:</span></p>



<a name="198376046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198376046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198376046">(May 21 2020 at 20:53)</a>:</h4>
<p>well that's... weird</p>



<a name="198376050"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198376050" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198376050">(May 21 2020 at 20:53)</a>:</h4>
<p>I blame macOS :P</p>



<a name="198376056"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198376056" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198376056">(May 21 2020 at 20:53)</a>:</h4>
<p>That's worrying :D</p>



<a name="198376160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198376160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198376160">(May 21 2020 at 20:54)</a>:</h4>
<p><a href="https://superuser.com/questions/789796/what-is-the-terminal-command-other-than-ctrl-c-to-exit-a-running-node-js-progr">https://superuser.com/questions/789796/what-is-the-terminal-command-other-than-ctrl-c-to-exit-a-running-node-js-progr</a></p>



<a name="198376165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198376165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198376165">(May 21 2020 at 20:54)</a>:</h4>
<p>no idea if that makes any sense</p>



<a name="198376184"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198376184" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198376184">(May 21 2020 at 20:54)</a>:</h4>
<p>does "command + ." do anything?^^</p>



<a name="198376230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198376230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198376230">(May 21 2020 at 20:55)</a>:</h4>
<p>Doesn't seem like it</p>



<a name="198376251"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198376251" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198376251">(May 21 2020 at 20:55)</a>:</h4>
<p>Well MacOS is just another UNIX system</p>



<a name="198376266"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198376266" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198376266">(May 21 2020 at 20:55)</a>:</h4>
<p>Ctrl-C works</p>



<a name="198376377"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198376377" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198376377">(May 21 2020 at 20:56)</a>:</h4>
<p>some other places of the internet suggest using lldb instead</p>



<a name="198376388"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198376388" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198376388">(May 21 2020 at 20:56)</a>:</h4>
<p>I never used that but I presume it is mostly compatible with gdb...</p>



<a name="198376471"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198376471" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198376471">(May 21 2020 at 20:57)</a>:</h4>
<p>Oh wow, Ctrl-Z got me:</p>
<div class="codehilite"><pre><span></span><code>[1]  + 1440 suspended  gdb rustc src/main.rs
</code></pre></div>



<a name="198376483"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198376483" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198376483">(May 21 2020 at 20:57)</a>:</h4>
<p>But no gdb prompt though :P</p>



<a name="198376503"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198376503" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198376503">(May 21 2020 at 20:57)</a>:</h4>
<p>yah Ctrl-Z would send the entire thing to the background</p>



<a name="198376511"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198376511" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198376511">(May 21 2020 at 20:57)</a>:</h4>
<p>but now you can <code>kill %1</code> :D</p>



<a name="198376592"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198376592" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198376592">(May 21 2020 at 20:58)</a>:</h4>
<p>I mean I can also close my terminal</p>



<a name="198376601"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198376601" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198376601">(May 21 2020 at 20:58)</a>:</h4>
<p>But that won't help</p>



<a name="198376633"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198376633" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198376633">(May 21 2020 at 20:58)</a>:</h4>
<p>right but that above kills the first background process</p>



<a name="198376655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198376655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198376655">(May 21 2020 at 20:58)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> I've heard reports that on some platforms gdb is .. less than ideal, and sometimes just doesn't give backtraces</p>



<a name="198376705"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198376705" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198376705">(May 21 2020 at 20:59)</a>:</h4>
<p>Let's try with lldb then I guess</p>



<a name="198376744"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198376744" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198376744">(May 21 2020 at 20:59)</a>:</h4>
<p><span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="198376794"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198376794" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198376794">(May 21 2020 at 21:00)</a>:</h4>
<p>and set <code>RUSTC_LOG</code> so you can see when the log stops moving</p>



<a name="198377099"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198377099" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198377099">(May 21 2020 at 21:02)</a>:</h4>
<p>Oh right</p>



<a name="198377140"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198377140" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198377140">(May 21 2020 at 21:02)</a>:</h4>
<p><code>export RUSTC_LOG=rustc</code></p>



<a name="198377250"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198377250" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198377250">(May 21 2020 at 21:03)</a>:</h4>
<p>Yeah I don’t recommend gdb on macOS, you’re going to run into a bunch of problems. I still haven’t figured out how to correctly enable it without permanently disabling system integrity protection. All the guides are out of date or wrong.</p>



<a name="198377305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198377305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198377305">(May 21 2020 at 21:04)</a>:</h4>
<p><span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span></p>
<div class="codehilite"><pre><span></span><code>(lldb) target create rustc
Current executable set to &#39;rustc&#39; (x86_64).
(lldb) run +nightly src/main.rs
Process 1712 launched: &#39;/Users/tous/.cargo/bin/rustc&#39; (x86_64)
Process 1712 stopped
* thread #2, stop reason = exec
    frame #0: 0x000000010026a000 dyld`_dyld_start
dyld`_dyld_start:
-&gt;  0x10026a000 &lt;+0&gt;: popq   %rdi
    0x10026a001 &lt;+1&gt;: pushq  $0x0
    0x10026a003 &lt;+3&gt;: movq   %rsp, %rbp
    0x10026a006 &lt;+6&gt;: andq   $-0x10, %rsp
Target 0: (rustc) stopped.
</code></pre></div>



<a name="198377347"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198377347" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198377347">(May 21 2020 at 21:04)</a>:</h4>
<p>oh... we probably need to move one wrapper down</p>



<a name="198377359"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198377359" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198377359">(May 21 2020 at 21:04)</a>:</h4>
<p><code>rustc</code> here is still the <code>rustup</code> wrapper</p>



<a name="198377405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198377405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198377405">(May 21 2020 at 21:05)</a>:</h4>
<p>So I want to use the path to the binary?</p>



<a name="198377427"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198377427" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198377427">(May 21 2020 at 21:05)</a>:</h4>
<p>the actual rustc binary is somewhere in... <code>~/.rustup/toolchains</code></p>



<a name="198377442"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198377442" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198377442">(May 21 2020 at 21:05)</a>:</h4>
<p>so you want to use <code>lldb ~/.rustup/toolchains/nightly/...</code> or so</p>



<a name="198377531"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198377531" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198377531">(May 21 2020 at 21:06)</a>:</h4>
<p>Yeah, it works</p>



<a name="198377554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198377554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198377554">(May 21 2020 at 21:06)</a>:</h4>
<p>And already stopped at <code>LEAVING(0) main (unwinding = false)</code></p>



<a name="198377607"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198377607" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198377607">(May 21 2020 at 21:07)</a>:</h4>
<p>Here's what I get:</p>
<div class="codehilite"><pre><span></span><code>(lldb) bt
* thread #1, queue = &#39;com.apple.main-thread&#39;, stop reason = signal SIGSTOP
  * frame #0: 0x00007fff6ce289f6 libsystem_kernel.dylib`__ulock_wait + 10
    frame #1: 0x00007fff6ceef385 libsystem_pthread.dylib`_pthread_join + 323
    frame #2: 0x0000000106eebe90 libstd-0f45f03d2da49250.dylib`std::sys::unix::thread::Thread::join::he4b5475ec86f3950 + 16
    frame #3: 0x000000010048f8f6 librustc_driver-e74b82e42afdd3af.dylib`std::thread::JoinHandle$LT$T$GT$::join::hb00ce852782dd91f + 54
    frame #4: 0x00000001004d4899 librustc_driver-e74b82e42afdd3af.dylib`rustc_interface::util::spawn_thread_pool::h5019077c47c5b3d4 + 537
    frame #5: 0x00000001004b83df librustc_driver-e74b82e42afdd3af.dylib`rustc_driver::run_compiler::hec7ed5e1b2ad17c0 + 7663
    frame #6: 0x00000001004f9b48 librustc_driver-e74b82e42afdd3af.dylib`_$LT$std..panic..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::hc5599978260bb5a2 + 120
    frame #7: 0x00000001004be432 librustc_driver-e74b82e42afdd3af.dylib`rustc_driver::catch_with_exit_code::h8593be9703207610 + 18
    frame #8: 0x00000001004bf58b librustc_driver-e74b82e42afdd3af.dylib`rustc_driver::main::hddcc79ad40e9575f + 43
    frame #9: 0x0000000100000cde rustc`rustc_binary::main::heca050561af94105 + 14
    frame #10: 0x0000000100000d16 rustc`std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::h3c5158dd276dd7dc + 6
    frame #11: 0x0000000106eddc69 libstd-0f45f03d2da49250.dylib`std::rt::lang_start_internal::heec5cb3c6d314455 + 441
    frame #12: 0x0000000100000d09 rustc`main + 41
    frame #13: 0x0000000100000cc4 rustc`start + 52
</code></pre></div>



<a name="198377687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198377687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198377687">(May 21 2020 at 21:08)</a>:</h4>
<p>I guess I need to navigate through the threads, right?</p>



<a name="198377688"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198377688" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198377688">(May 21 2020 at 21:08)</a>:</h4>
<p>yeah thats the main thread</p>



<a name="198377698"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198377698" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198377698">(May 21 2020 at 21:08)</a>:</h4>
<p>and its not helpful</p>



<a name="198377716"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198377716" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198377716">(May 21 2020 at 21:08)</a>:</h4>
<p>also ugh why doesn't it resolve the symbols :/</p>



<a name="198377725"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198377725" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198377725">(May 21 2020 at 21:08)</a>:</h4>
<p>How would you proceed on GDB?</p>



<a name="198377730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198377730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198377730">(May 21 2020 at 21:08)</a>:</h4>
<p><code>thread apply all bt</code></p>



<a name="198377734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198377734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198377734">(May 21 2020 at 21:08)</a>:</h4>
<p>LLDB seems very similar</p>



<a name="198377742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198377742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198377742">(May 21 2020 at 21:08)</a>:</h4>
<p>then you get the backtraces of <em>all</em> threads</p>



<a name="198377808"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198377808" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198377808">(May 21 2020 at 21:09)</a>:</h4>
<p>(I should also note that we are going through more than 80% of my gdb knowledge here. I am <em>not</em> a gdb guru, I just know how to do this one thing.^^)</p>



<a name="198377813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198377813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198377813">(May 21 2020 at 21:09)</a>:</h4>
<p>Doesn't work on lldb unfortunately</p>



<a name="198377824"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198377824" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198377824">(May 21 2020 at 21:09)</a>:</h4>
<div class="codehilite"><pre><span></span><code>(lldb) thread list
Process 1738 stopped
* thread #1: tid = 0x5179, 0x00007fff6ce289f6 libsystem_kernel.dylib`__ulock_wait + 10, queue = &#39;com.apple.main-thread&#39;, stop reason = signal SIGSTOP
  thread #2: tid = 0x5194, 0x0000000102f320d4 librustc_driver-e74b82e42afdd3af.dylib`_$LT$rustc_mir..interpret..intern..InternVisitor$LT$M$GT$$u20$as$u20$rustc_mir..interpret..visitor..ValueVisitor$LT$M$GT$$GT$::visit_value::h37ced94f75053e5e + 1236, name = &#39;rustc&#39;
````
</code></pre></div>



<a name="198377891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198377891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198377891">(May 21 2020 at 21:10)</a>:</h4>
<p>Any useful info in there?</p>



<a name="198377938"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198377938" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198377938">(May 21 2020 at 21:10)</a>:</h4>
<p><a href="https://lldb.llvm.org/use/map.html">https://lldb.llvm.org/use/map.html</a></p>



<a name="198377960"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198377960" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198377960">(May 21 2020 at 21:10)</a>:</h4>
<p>Thread 2 seems suspicious :D</p>



<a name="198378006"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198378006" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198378006">(May 21 2020 at 21:10)</a>:</h4>
<p>looks like the lldb thing is <code>bt all </code></p>



<a name="198378035"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198378035" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198378035">(May 21 2020 at 21:11)</a>:</h4>
<p>Yeah that works</p>



<a name="198378069"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198378069" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198378069">(May 21 2020 at 21:11)</a>:</h4>
<p><span aria-label="tada" class="emoji emoji-1f389" role="img" title="tada">:tada:</span></p>



<a name="198378094"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198378094" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198378094">(May 21 2020 at 21:11)</a>:</h4>
<p>Raw output is too large for Zulip though <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>



<a name="198378104"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198378104" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198378104">(May 21 2020 at 21:11)</a>:</h4>
<p>lol</p>



<a name="198378123"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198378123" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198378123">(May 21 2020 at 21:11)</a>:</h4>
<p>just put it in the GH issue (in <code>&lt;details&gt;</code> like you did with the log)</p>



<a name="198378165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198378165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198378165">(May 21 2020 at 21:12)</a>:</h4>
<p>I need to get to sleep anyway ;)</p>



<a name="198378212"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198378212" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198378212">(May 21 2020 at 21:12)</a>:</h4>
<p>gist, please, though</p>



<a name="198378255"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198378255" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198378255">(May 21 2020 at 21:13)</a>:</h4>
<p>or that</p>



<a name="198378263"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198378263" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198378263">(May 21 2020 at 21:13)</a>:</h4>
<p><span class="user-mention silent" data-user-id="120791">RalfJ</span> <a href="#narrow/stream/122651-general/topic/Debugging.20with.20GDB/near/198378165">said</a>:</p>
<blockquote>
<p>I need to get to sleep anyway ;)</p>
</blockquote>
<p>Goodnight then!</p>



<a name="198378280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198378280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198378280">(May 21 2020 at 21:13)</a>:</h4>
<p>Thanks a whole lot for the help</p>



<a name="198378298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198378298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198378298">(May 21 2020 at 21:13)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116122">simulacrum</span> <a href="#narrow/stream/122651-general/topic/Debugging.20with.20GDB/near/198378212">said</a>:</p>
<blockquote>
<p>gist, please, though</p>
</blockquote>
<p>any reason to prefer that over the foldable <code>&lt;details&gt;</code> thing?</p>



<a name="198378307"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198378307" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198378307">(May 21 2020 at 21:13)</a>:</h4>
<p><span class="user-mention" data-user-id="255061">@LeSeulArtichaut</span>  thank you for looking into this issue :)</p>



<a name="198378841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198378841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198378841">(May 21 2020 at 21:19)</a>:</h4>
<p>Yeah, <code>&lt;details&gt;</code> won't fold in ~all email clients I'm aware of</p>



<a name="198378854"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198378854" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198378854">(May 21 2020 at 21:19)</a>:</h4>
<p>so you end up with a <em>very</em> long email</p>



<a name="198378901"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198378901" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198378901">(May 21 2020 at 21:19)</a>:</h4>
<p>not to mention that it's a pain to scroll in github's ui, I'd much rather firefox's plain text view or w/e</p>



<a name="198379259"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198379259" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198379259">(May 21 2020 at 21:23)</a>:</h4>
<p>Created a gist</p>



<a name="198379293"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198379293" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198379293">(May 21 2020 at 21:23)</a>:</h4>
<p>Last frame is:</p>
<div class="codehilite"><pre><span></span><code>frame #0: 0x0000000102f320d4 librustc_driver-e74b82e42afdd3af.dylib`_$LT$rustc_mir..interpret..intern..InternVisitor$LT$M$GT$$u20$as$u20$rustc_mir..interpret..visitor..ValueVisitor$LT$M$GT$$GT$::visit_value::h37ced94f75053e5e + 1236
</code></pre></div>



<a name="198379365"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198379365" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198379365">(May 21 2020 at 21:24)</a>:</h4>
<p>So I think this is definitely a const-eval problem?</p>



<a name="198379737"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198379737" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198379737">(May 21 2020 at 21:28)</a>:</h4>
<p><span class="user-mention" data-user-id="255061">@LeSeulArtichaut</span> btw, this is a nice thing to better document on Rustc Dev Guide :)</p>



<a name="198379756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198379756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198379756">(May 21 2020 at 21:29)</a>:</h4>
<p>I was also thinking that :D</p>



<a name="198379896"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198379896" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198379896">(May 21 2020 at 21:30)</a>:</h4>
<p>I had the idea of gathering a bunch of chapters we have an create a complete introspection section</p>



<a name="198379935"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198379935" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198379935">(May 21 2020 at 21:31)</a>:</h4>
<p>plus some new content probably</p>



<a name="198487940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Debugging%20with%20GDB/near/198487940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Debugging.20with.20GDB.html#198487940">(May 22 2020 at 19:57)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116122">simulacrum</span> <a href="#narrow/stream/122651-general/topic/Debugging.20with.20GDB/near/198378841">said</a>:</p>
<blockquote>
<p>Yeah, <code>&lt;details&gt;</code> won't fold in ~all email clients I'm aware of</p>
</blockquote>
<p>it folds in thunderbird, FWIW, so I wasnt aware.^^</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>